package cn.truistic.enmicromsg.app;

import android.app.Application;
import android.content.Context;

import org.litepal.LitePal;

import cn.truistic.enmicromsg.common.util.PreferenceHelper;

/**
 * EnApplication
 */
public class EnApplication extends Application {

    public static Context mContext ;

    /**
     * 附近人模块
     */
    private boolean NearbyPeople = false;

    /**
     * 允许附近的人打招呼
     */
    private boolean AllowGreeting = false;
    /**
     * 一键发消息
     */
    private boolean AKeySendMessage = false;
    /**
     * 允许一键发消息
     */
    private boolean AllowAKeySendMessage = false;

    /**
     * 朋友圈模块
     */
    private boolean FriendCircle = false;
    /**
     * 允许朋友圈
     */
    private boolean AllowFriendCircle = false;

    public boolean isFriendCircle() {
        return FriendCircle;
    }

    public void setFriendCircle(boolean friendCircle) {
        FriendCircle = friendCircle;
    }

    public boolean isAllowFriendCircle() {
        return AllowFriendCircle;
    }

    public void setAllowFriendCircle(boolean allowFriendCircle) {
        AllowFriendCircle = allowFriendCircle;
    }

    public boolean isAKeySendMessage() {
        return AKeySendMessage;
    }

    public void setAKeySendMessage(boolean AKeySendMessage) {
        this.AKeySendMessage = AKeySendMessage;
    }

    public boolean isAllowAKeySendMessage() {
        return AllowAKeySendMessage;
    }

    public void setAllowAKeySendMessage(boolean allowAKeySendMessage) {
        AllowAKeySendMessage = allowAKeySendMessage;
    }

    public boolean isAllowGreeting() {
        return AllowGreeting;
    }

    public void setAllowGreeting(boolean allowGreeting) {
        AllowGreeting = allowGreeting;
    }

    public boolean isNearbyPeople() {
        return NearbyPeople;
    }

    public void setNearbyPeople(boolean nearbyPeople) {
        NearbyPeople = nearbyPeople;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        mContext =  getApplicationContext();
        PreferenceHelper.init(mContext);
        LitePal.initialize(this);//初始化数据库
    }
}
